import React from "react";

import Constants from "../../common/Constants";
import BaseAction from "../common/BaseAction";

//读取本地步数
export default class SportOptionsStepConfigAction extends BaseAction {
  constructor(props) {
    super(props);
    this.moduleType = Constants.MODULE_TYPE.SPORT;
    this.name = "SportOptionsStepConfigAction";
  }

  finish(data, isSucceed, response) {
    console.log("SportOptionsStepConfigAction", data, isSucceed, response);
    if (isSucceed) {
      this.caller.setState({
        showSportInfo: false
      });
    } else {
      this.caller.setState({
        stepsConfig: {},
        showSportInfo: true
      });
    }
  }
}
